import os,sys,glob
if __name__=='__main__':
    if len(sys.argv) < 2:
        print 'Usage:',sys.argv[0],'in'
        exit(2)
    inlist = glob.glob(sys.argv[1]+r"\*.jpg")
    outfile1 = sys.argv[1]+"//h.txt"
    outfile3 = sys.argv[1]+"//m.txt"
    outfile2 = sys.argv[1]+"//h2.txt"
    try:
        os.remove(outfile1)
    except:
        pass
    try:
        os.remove(outfile2)
    except:
        pass
    try:
        os.remove(outfile3)
    except:
        pass
    for infile in inlist:
        print infile
        os.system(r'"d:\Dropbox\steganalysis\lib\test.exe" '+infile+' '+outfile2+' '+outfile3)
        os.system(r'"D:\Users\sean\Documents\Visual Studio 2008\Projects\testijg\lib\feature.exe" '+infile+' >> '+outfile1)


